.class public Lcom/glympse/platform/common/FacebookJobs$PostJob;
.super Lcom/glympse/platform/common/JobQueue$Job;
.source "FacebookJobs.java"

# interfaces
.implements Lcom/glympse/platform/GFacebook$Callback;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/platform/common/FacebookJobs;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "PostJob"
.end annotation


# instance fields
.field private m_fSuccess:Z

.field private m_oParams:Lcom/glympse/platform/GFacebook$Params;

.field private m_oRecipient:Lcom/glympse/platform/common/Recipient;

.field private m_strError:Ljava/lang/String;


# direct methods
.method public constructor <init>(Lcom/glympse/platform/common/Ticket;Lcom/glympse/platform/common/Recipient;Ljava/lang/String;)V
    .locals 12
    .parameter "oTicket"
    .parameter "oRecipient"
    .parameter "strMessage"

    .prologue
    .line 74
    invoke-direct {p0}, Lcom/glympse/platform/common/JobQueue$Job;-><init>()V

    .line 68
    const/4 v8, 0x0

    iput-object v8, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    .line 69
    const/4 v8, 0x0

    iput-boolean v8, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_fSuccess:Z

    .line 70
    const/4 v8, 0x0

    iput-object v8, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_strError:Ljava/lang/String;

    .line 71
    const/4 v8, 0x0

    iput-object v8, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oParams:Lcom/glympse/platform/GFacebook$Params;

    .line 76
    const/4 v8, 0x1

    iput-boolean v8, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_fCompleteOnMainThread:Z

    .line 78
    iput-object p2, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    .line 99
    const-string v7, "http://redir.glympse.com/fbimg/"

    .line 100
    .local v7, strUrlImage:Ljava/lang/String;
    iget-object v8, p2, Lcom/glympse/platform/common/Recipient;->m_strRecipientUrl:Ljava/lang/String;

    invoke-static {v8}, Lcom/glympse/platform/common/Helpers;->EncodeProtocolString(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v6

    .line 101
    .local v6, strUrlGlympse:Ljava/lang/String;
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "http://redir.glympse.com/fbswf/?t="

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-wide v9, p2, Lcom/glympse/platform/common/Recipient;->m_lRecipientTicketId:J

    invoke-static {v9, v10}, Lcom/glympse/platform/common/Helpers;->LongToBase32(J)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Lcom/glympse/platform/common/Helpers;->EncodeProtocolString(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v4

    .line 102
    .local v4, strUrlFlash:Ljava/lang/String;
    const-string v8, "http://redir.glympse.com/fbget/"

    invoke-static {v8}, Lcom/glympse/platform/common/Helpers;->EncodeProtocolString(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v5

    .line 105
    .local v5, strUrlGet:Ljava/lang/String;
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v8

    iget-object v8, v8, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    iget-boolean v8, v8, Lcom/glympse/platform/Config;->m_fShareMyLocation:Z

    if-eqz v8, :cond_2

    .line 106
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v8

    iget-object v8, v8, Lcom/glympse/platform/Platform;->m_oLocManager:Lcom/glympse/platform/LocManager;

    iget-object v8, v8, Lcom/glympse/platform/LocManager;->m_oLastLocPoint:Lcom/glympse/platform/common/LocPoint;

    invoke-virtual {v8}, Lcom/glympse/platform/common/LocPoint;->HasLocation()Z

    move-result v8

    if-eqz v8, :cond_2

    .line 109
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v9, "?loc="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 110
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v9

    iget-object v9, v9, Lcom/glympse/platform/Platform;->m_oLocManager:Lcom/glympse/platform/LocManager;

    iget-object v9, v9, Lcom/glympse/platform/LocManager;->m_oLastLocPoint:Lcom/glympse/platform/common/LocPoint;

    iget-wide v9, v9, Lcom/glympse/platform/common/LocPoint;->m_dLatitude:D

    const/4 v11, 0x6

    invoke-static {v9, v10, v11}, Lcom/glympse/platform/common/Helpers;->DoubleToTrimmedStr(DI)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, ","

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 111
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v9

    iget-object v9, v9, Lcom/glympse/platform/Platform;->m_oLocManager:Lcom/glympse/platform/LocManager;

    iget-object v9, v9, Lcom/glympse/platform/LocManager;->m_oLastLocPoint:Lcom/glympse/platform/common/LocPoint;

    iget-wide v9, v9, Lcom/glympse/platform/common/LocPoint;->m_dLongitude:D

    const/4 v11, 0x6

    invoke-static {v9, v10, v11}, Lcom/glympse/platform/common/Helpers;->DoubleToTrimmedStr(DI)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 109
    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 114
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v8

    iget-object v8, v8, Lcom/glympse/platform/Platform;->m_oLocManager:Lcom/glympse/platform/LocManager;

    iget-object v8, v8, Lcom/glympse/platform/LocManager;->m_oLastLocPoint:Lcom/glympse/platform/common/LocPoint;

    invoke-virtual {v8}, Lcom/glympse/platform/common/LocPoint;->HasAccuracy()Z

    move-result v8

    if-eqz v8, :cond_0

    .line 116
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v9, "&acm="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v9

    iget-object v9, v9, Lcom/glympse/platform/Platform;->m_oLocManager:Lcom/glympse/platform/LocManager;

    iget-object v9, v9, Lcom/glympse/platform/LocManager;->m_oLastLocPoint:Lcom/glympse/platform/common/LocPoint;

    iget v9, v9, Lcom/glympse/platform/common/LocPoint;->m_fltAccuracyMeters:F

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 120
    :cond_0
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v8

    iget-object v8, v8, Lcom/glympse/platform/Platform;->m_oLocManager:Lcom/glympse/platform/LocManager;

    iget-object v8, v8, Lcom/glympse/platform/LocManager;->m_oLastLocPoint:Lcom/glympse/platform/common/LocPoint;

    invoke-virtual {v8}, Lcom/glympse/platform/common/LocPoint;->HasBearing()Z

    move-result v8

    if-eqz v8, :cond_1

    .line 122
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v9, "&hdd="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v9

    iget-object v9, v9, Lcom/glympse/platform/Platform;->m_oLocManager:Lcom/glympse/platform/LocManager;

    iget-object v9, v9, Lcom/glympse/platform/LocManager;->m_oLastLocPoint:Lcom/glympse/platform/common/LocPoint;

    iget v9, v9, Lcom/glympse/platform/common/LocPoint;->m_fltBearingDegrees:F

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 126
    :cond_1
    iget-object v8, p1, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    if-eqz v8, :cond_2

    iget-object v8, p1, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    invoke-virtual {v8}, Lcom/glympse/platform/common/Place;->HasLocation()Z

    move-result v8

    if-eqz v8, :cond_2

    .line 128
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v9, "&dstloc="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 129
    iget-object v9, p1, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    iget-wide v9, v9, Lcom/glympse/platform/common/Place;->m_dLatitude:D

    const/4 v11, 0x6

    invoke-static {v9, v10, v11}, Lcom/glympse/platform/common/Helpers;->DoubleToTrimmedStr(DI)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, ","

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 130
    iget-object v9, p1, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    iget-wide v9, v9, Lcom/glympse/platform/common/Place;->m_dLongitude:D

    const/4 v11, 0x6

    invoke-static {v9, v10, v11}, Lcom/glympse/platform/common/Helpers;->DoubleToTrimmedStr(DI)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 128
    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 135
    :cond_2
    invoke-static {v7}, Lcom/glympse/platform/common/Helpers;->EncodeProtocolString(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v7

    .line 139
    const-string v3, ""

    .line 142
    .local v3, strProperties:Ljava/lang/String;
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v8

    iget-object v8, v8, Lcom/glympse/platform/Platform;->m_oUserList:Lcom/glympse/platform/common/UserList;

    invoke-virtual {v8}, Lcom/glympse/platform/common/UserList;->GetSelf()Lcom/glympse/platform/common/User;

    move-result-object v8

    iget-object v8, v8, Lcom/glympse/platform/common/User;->m_strActivity:Ljava/lang/String;

    invoke-static {v8}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v8

    if-nez v8, :cond_3

    .line 146
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v9

    if-lez v9, :cond_8

    const-string v9, ","

    :goto_0
    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "\"Location\":\""

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 147
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v9

    iget-object v9, v9, Lcom/glympse/platform/Platform;->m_oUserList:Lcom/glympse/platform/common/UserList;

    invoke-virtual {v9}, Lcom/glympse/platform/common/UserList;->GetSelf()Lcom/glympse/platform/common/User;

    move-result-object v9

    iget-object v9, v9, Lcom/glympse/platform/common/User;->m_strActivity:Ljava/lang/String;

    invoke-static {v9}, Lcom/glympse/platform/common/Helpers;->EncodeProtocolString(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "\""

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 146
    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 151
    :cond_3
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v8

    iget-object v8, v8, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    iget-boolean v8, v8, Lcom/glympse/platform/Config;->m_fShareSpeed:Z

    if-eqz v8, :cond_4

    .line 152
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v8

    iget-object v8, v8, Lcom/glympse/platform/Platform;->m_oLocManager:Lcom/glympse/platform/LocManager;

    iget-object v8, v8, Lcom/glympse/platform/LocManager;->m_oLastLocPoint:Lcom/glympse/platform/common/LocPoint;

    invoke-virtual {v8}, Lcom/glympse/platform/common/LocPoint;->HasSpeed()Z

    move-result v8

    if-eqz v8, :cond_4

    .line 155
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v8

    iget-object v8, v8, Lcom/glympse/platform/Platform;->m_oLocManager:Lcom/glympse/platform/LocManager;

    iget-object v8, v8, Lcom/glympse/platform/LocManager;->m_oLastLocPoint:Lcom/glympse/platform/common/LocPoint;

    iget v8, v8, Lcom/glympse/platform/common/LocPoint;->m_fltSpeedMetersPerSecond:F

    float-to-double v8, v8

    const-wide/high16 v10, 0x3fe0

    cmpl-double v8, v8, v10

    if-lez v8, :cond_a

    .line 157
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v9

    if-lez v9, :cond_9

    const-string v9, ","

    :goto_1
    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "\"Speed\":\""

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 158
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v9

    iget-object v9, v9, Lcom/glympse/platform/Platform;->m_oLocManager:Lcom/glympse/platform/LocManager;

    iget-object v9, v9, Lcom/glympse/platform/LocManager;->m_oLastLocPoint:Lcom/glympse/platform/common/LocPoint;

    iget v9, v9, Lcom/glympse/platform/common/LocPoint;->m_fltSpeedMetersPerSecond:F

    const/4 v10, 0x1

    invoke-static {v9, v10}, Lcom/glympse/platform/common/Helpers;->SpeedToStr(FZ)Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "\""

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 157
    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 167
    :cond_4
    :goto_2
    iget-object v8, p1, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    if-eqz v8, :cond_5

    iget-object v8, p1, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    iget-object v8, v8, Lcom/glympse/platform/common/Place;->m_strName:Ljava/lang/String;

    invoke-static {v8}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v8

    if-nez v8, :cond_5

    .line 171
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v9

    if-lez v9, :cond_c

    const-string v9, ","

    :goto_3
    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "\"Destination\":\""

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 172
    iget-object v9, p1, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    iget-object v9, v9, Lcom/glympse/platform/common/Place;->m_strName:Ljava/lang/String;

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "\""

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 171
    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 178
    :cond_5
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v9

    if-lez v9, :cond_d

    const-string v9, ","

    :goto_4
    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "\"Sent via\":\"Glympse for "

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "Android"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "\""

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 186
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "{\"name\":\"Click for a real-time view of my location\",\"href\":\""

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "\","

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 189
    .local v1, strAttachment:Ljava/lang/String;
    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v8

    if-lez v8, :cond_6

    .line 191
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v9, "\"properties\":{"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "},"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 195
    :cond_6
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v9, "\"media\":[{\"type\":\"flash\",\"swfsrc\":\""

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "\",\"imgsrc\":\""

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 196
    invoke-virtual {v8, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "\",\"width\":\"130\",\"height\":\"130\",\"expanded_width\":\"460\",\"expanded_height\":\"460\"}]}"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    .line 195
    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 199
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "[{\"text\":\"Get Glympse on your phone\",\"href\":\""

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "\"}]"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 202
    .local v0, strActionLinks:Ljava/lang/String;
    const/4 v2, 0x0

    .line 217
    .local v2, strPrivacy:Ljava/lang/String;
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v8

    iget-object v8, v8, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    iget v8, v8, Lcom/glympse/platform/Config;->m_eFacebookScope:I

    packed-switch v8, :pswitch_data_0

    .line 232
    :goto_5
    invoke-static {v1}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 233
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 236
    new-instance v8, Lcom/glympse/platform/GFacebook$Params;

    invoke-direct {v8}, Lcom/glympse/platform/GFacebook$Params;-><init>()V

    iput-object v8, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oParams:Lcom/glympse/platform/GFacebook$Params;

    .line 239
    iget-object v8, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oParams:Lcom/glympse/platform/GFacebook$Params;

    const-string v9, "message"

    invoke-static {p3}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v10

    if-eqz v10, :cond_e

    const-string v10, "Here\'s my location, courtesy of Glympse"

    :goto_6
    invoke-virtual {v8, v9, v10}, Lcom/glympse/platform/GFacebook$Params;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 240
    iget-object v8, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oParams:Lcom/glympse/platform/GFacebook$Params;

    const-string v9, "attachment"

    invoke-virtual {v8, v9, v1}, Lcom/glympse/platform/GFacebook$Params;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 241
    iget-object v8, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oParams:Lcom/glympse/platform/GFacebook$Params;

    const-string v9, "action_links"

    invoke-virtual {v8, v9, v0}, Lcom/glympse/platform/GFacebook$Params;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 243
    if-eqz v2, :cond_7

    .line 245
    iget-object v8, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oParams:Lcom/glympse/platform/GFacebook$Params;

    const-string v9, "privacy"

    invoke-virtual {v8, v9, v2}, Lcom/glympse/platform/GFacebook$Params;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 293
    :cond_7
    return-void

    .line 146
    .end local v0           #strActionLinks:Ljava/lang/String;
    .end local v1           #strAttachment:Ljava/lang/String;
    .end local v2           #strPrivacy:Ljava/lang/String;
    :cond_8
    const-string v9, ""

    goto/16 :goto_0

    .line 157
    :cond_9
    const-string v9, ""

    goto/16 :goto_1

    .line 162
    :cond_a
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v9

    if-lez v9, :cond_b

    const-string v9, ","

    :goto_7
    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "\"Speed\":\"Not moving\""

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    goto/16 :goto_2

    :cond_b
    const-string v9, ""

    goto :goto_7

    .line 171
    :cond_c
    const-string v9, ""

    goto/16 :goto_3

    .line 178
    :cond_d
    const-string v9, ""

    goto/16 :goto_4

    .line 219
    .restart local v0       #strActionLinks:Ljava/lang/String;
    .restart local v1       #strAttachment:Ljava/lang/String;
    .restart local v2       #strPrivacy:Ljava/lang/String;
    :pswitch_0
    const-string v2, "{\"value\":\"CUSTOM\",\"friends\":\"SELF\"}"

    goto :goto_5

    .line 220
    :pswitch_1
    const-string v2, "{\"value\":\"ALL_FRIENDS\"}"

    goto :goto_5

    .line 221
    :pswitch_2
    const-string v2, "{\"value\":\"FRIENDS_OF_FRIENDS\"}"

    goto :goto_5

    .line 222
    :pswitch_3
    const-string v2, "{\"value\":\"CUSTOM\",\"friends\":\"NO_FRIENDS\",\"networks\":\"1\"}"

    goto :goto_5

    .line 223
    :pswitch_4
    const-string v2, "{\"value\":\"NETWORKS_FRIENDS\"}"

    goto :goto_5

    .line 224
    :pswitch_5
    const-string v2, "{\"value\":\"CUSTOM\",\"friends\":\"FRIENDS_OF_FRIENDS\",\"networks\":\"1\"}"

    goto :goto_5

    .line 225
    :pswitch_6
    const-string v2, "{\"value\":\"EVERYONE\"}"

    goto :goto_5

    :cond_e
    move-object v10, p3

    .line 239
    goto :goto_6

    .line 217
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
        :pswitch_5
        :pswitch_6
    .end packed-switch
.end method


# virtual methods
.method public FacebookPostResult(ZLjava/lang/String;)V
    .locals 0
    .parameter "fSuccess"
    .parameter "strError"

    .prologue
    .line 326
    iput-boolean p1, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_fSuccess:Z

    .line 327
    iput-object p2, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_strError:Ljava/lang/String;

    .line 328
    return-void
.end method

.method public OnComplete(Lcom/glympse/platform/common/JobQueue;)V
    .locals 4
    .parameter "oJobQueue"

    .prologue
    const/16 v3, 0x2e

    .line 304
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oParams:Lcom/glympse/platform/GFacebook$Params;

    .line 307
    iget-object v0, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-boolean v1, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_fSuccess:Z

    if-eqz v1, :cond_2

    const/4 v1, 0x5

    :goto_0
    iput v1, v0, Lcom/glympse/platform/common/Recipient;->m_eSendState:I

    .line 308
    iget-boolean v0, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_fSuccess:Z

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_strError:Ljava/lang/String;

    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_1

    .line 310
    iget-object v0, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-object v1, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_strError:Ljava/lang/String;

    iput-object v1, v0, Lcom/glympse/platform/common/Recipient;->m_strResult:Ljava/lang/String;

    .line 313
    iget-object v0, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-object v0, v0, Lcom/glympse/platform/common/Recipient;->m_strResult:Ljava/lang/String;

    iget-object v1, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-object v1, v1, Lcom/glympse/platform/common/Recipient;->m_strResult:Ljava/lang/String;

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v1

    const/4 v2, 0x1

    sub-int/2addr v1, v2

    invoke-virtual {v0, v1}, Ljava/lang/String;->charAt(I)C

    move-result v0

    if-eq v3, v0, :cond_0

    .line 315
    iget-object v0, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-object v1, v0, Lcom/glympse/platform/common/Recipient;->m_strResult:Ljava/lang/String;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/glympse/platform/common/Recipient;->m_strResult:Ljava/lang/String;

    .line 318
    :cond_0
    iget-object v0, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oRecipient:Lcom/glympse/platform/common/Recipient;

    iget-object v1, v0, Lcom/glympse/platform/common/Recipient;->m_strResult:Ljava/lang/String;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, " You may need to sign out of Facebook and sign in again."

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/glympse/platform/common/Recipient;->m_strResult:Ljava/lang/String;

    .line 320
    :cond_1
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    const/16 v1, 0x1000

    invoke-virtual {v0, v1}, Lcom/glympse/platform/Platform;->DoUpdate(I)V

    .line 321
    return-void

    .line 307
    :cond_2
    const/4 v1, 0x4

    goto :goto_0
.end method

.method public OnProcess()V
    .locals 2

    .prologue
    .line 298
    new-instance v0, Lcom/glympse/platform/GFacebook;

    iget-object v1, p0, Lcom/glympse/platform/common/FacebookJobs$PostJob;->m_oParams:Lcom/glympse/platform/GFacebook$Params;

    invoke-direct {v0, p0, v1}, Lcom/glympse/platform/GFacebook;-><init>(Lcom/glympse/platform/GFacebook$Callback;Lcom/glympse/platform/GFacebook$Params;)V

    .line 299
    return-void
.end method
